import { 
  QUERY_CLIENT,
  ADD_USER_MULTIL,
  QUERY_USER_CLIENT,
  ADD_NEW_INVITE,
  EDIT_NEW_INVITE,
  DELETE_NEW_INVITE
} from './api'
import { METHOD, request } from '@/utils/request'

/**
 * 查询应用下的子应用和客户端类型
 */
export async function getClientsList(params) {
  return request(QUERY_CLIENT, METHOD.POST, params)
}
/**
 * 邀请子应用
 */
 export async function addUserNew(params) {
  return request(ADD_USER_MULTIL, METHOD.POST, params)
}
/**
 * 查看应用绑定关系
 */
 export async function queryUserClient(params) {
  return request(QUERY_USER_CLIENT, METHOD.POST, params)
}
/**
 * 新增
 */
 export async function addNewInvite(params) {
  return request(ADD_NEW_INVITE, METHOD.POST, params)
}
/**
 * 编辑
 */
 export async function editNewInvite(params) {
  return request(EDIT_NEW_INVITE, METHOD.POST, params)
}
/**
 * 删除
 */
 export async function deleteNewInvite(params) {
  return request(`${DELETE_NEW_INVITE}/${params}`, METHOD.GET)
}
